Integrand size = 36, antiderivative size = 32 \[ \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a B x+\frac {a (B+C) \text {arctanh}(\sin (c+d x))}{d}+\frac {a C \tan (c+d x)}{d} \]
Time = 0.01 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.34 \[ \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a B x+\frac {a B \text {arctanh}(\sin (c+d x))}{d}+\frac {a C \text {arctanh}(\sin (c+d x))}{d}+\frac {a C \tan (c+d x)}{d} \]
a*B*x + (a*B*ArcTanh[Sin[c + d*x]])/d + (a*C*ArcTanh[Sin[c + d*x]])/d + (a *C*Tan[c + d*x])/d
Time = 0.40 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3042, 4560, 3042, 4402, 3042, 4254, 24, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos (c+d x) (a \sec (c+d x)+a) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int (a \sec (c+d x)+a) (B+C \sec (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4402 |
\(\displaystyle a (B+C) \int \sec (c+d x)dx+a C \int \sec ^2(c+d x)dx+a B x\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a (B+C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+a C \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+a B x\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle a (B+C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a C \int 1d(-\tan (c+d x))}{d}+a B x\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a (B+C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+a B x+\frac {a C \tan (c+d x)}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {a (B+C) \text {arctanh}(\sin (c+d x))}{d}+a B x+\frac {a C \tan (c+d x)}{d}\) |
3.4.9.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Simp[a*c*x, x] + (Simp[b*d Int[Csc[e + f*x]^2, x], x ] + Simp[(b*c + a*d) Int[Csc[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f }, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 0.23 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.78
method | result | size |
derivativedivides | \(\frac {a B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C a \tan \left (d x +c \right )+a B \left (d x +c \right )+C a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(57\) |
default | \(\frac {a B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C a \tan \left (d x +c \right )+a B \left (d x +c \right )+C a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(57\) |
parallelrisch | \(-\frac {\left (\cos \left (d x +c \right ) \left (B +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\cos \left (d x +c \right ) \left (B +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-B x d \cos \left (d x +c \right )-C \sin \left (d x +c \right )\right ) a}{d \cos \left (d x +c \right )}\) | \(81\) |
risch | \(a B x +\frac {2 i C a}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(105\) |
norman | \(\frac {a B x +a B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {2 C a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 C a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-a B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-a B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}+\frac {a \left (B +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a \left (B +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(160\) |
1/d*(a*B*ln(sec(d*x+c)+tan(d*x+c))+C*a*tan(d*x+c)+a*B*(d*x+c)+C*a*ln(sec(d *x+c)+tan(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 79 vs. \(2 (32) = 64\).
Time = 0.26 (sec) , antiderivative size = 79, normalized size of antiderivative = 2.47 \[ \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, B a d x \cos \left (d x + c\right ) + {\left (B + C\right )} a \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (B + C\right )} a \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, C a \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]
1/2*(2*B*a*d*x*cos(d*x + c) + (B + C)*a*cos(d*x + c)*log(sin(d*x + c) + 1) - (B + C)*a*cos(d*x + c)*log(-sin(d*x + c) + 1) + 2*C*a*sin(d*x + c))/(d* cos(d*x + c))
\[ \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a \left (\int B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \]
a*(Integral(B*cos(c + d*x)*sec(c + d*x), x) + Integral(B*cos(c + d*x)*sec( c + d*x)**2, x) + Integral(C*cos(c + d*x)*sec(c + d*x)**2, x) + Integral(C *cos(c + d*x)*sec(c + d*x)**3, x))
Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (32) = 64\).
Time = 0.24 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.28 \[ \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (d x + c\right )} B a + B a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + C a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, C a \tan \left (d x + c\right )}{2 \, d} \]
1/2*(2*(d*x + c)*B*a + B*a*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + C*a*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 2*C*a*tan(d*x + c ))/d
Leaf count of result is larger than twice the leaf count of optimal. 84 vs. \(2 (32) = 64\).
Time = 0.28 (sec) , antiderivative size = 84, normalized size of antiderivative = 2.62 \[ \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (d x + c\right )} B a + {\left (B a + C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (B a + C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \]
((d*x + c)*B*a + (B*a + C*a)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - (B*a + C *a)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*C*a*tan(1/2*d*x + 1/2*c)/(tan(1 /2*d*x + 1/2*c)^2 - 1))/d
Time = 15.95 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.12 \[ \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C\,a\,\mathrm {tan}\left (c+d\,x\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]